using System;
using System.Collections.Generic;
using System.Text;
namespace ServiceStack
{
	public class Command
	{
		public string Name
		{
			get;
			set;
		}
		public List<string> Args
		{
			get;
			set;
		}
		public string Suffix
		{
			get;
			set;
		}
		public Command()
		{
			this.Args = new List<string>();
		}
		public string ToDebugString()
		{
			StringBuilder stringBuilder = new StringBuilder();
			foreach (string current in this.Args)
			{
				if (stringBuilder.Length > 0)
				{
					stringBuilder.Append('|');
				}
				stringBuilder.Append(current);
			}
			return "[{0}:{1}]{2}".Fmt(new object[]
			{
				this.Name,
				stringBuilder.ToString(),
				this.Suffix
			});
		}
		public override string ToString()
		{
			StringBuilder stringBuilder = new StringBuilder();
			foreach (string current in this.Args)
			{
				if (stringBuilder.Length > 0)
				{
					stringBuilder.Append(',');
				}
				stringBuilder.Append(current);
			}
			return "{0}({1}){2}".Fmt(new object[]
			{
				this.Name,
				stringBuilder.ToString(),
				this.Suffix
			});
		}
	}
}
